package com.techie.mdm.appbar.showcase.binding;

import org.springframework.binding.value.support.ValueHolder;

import java.beans.PropertyChangeListener;

/**
 * Fixes property notifications so that listeners registered for all
 * property changes are also notified.
 * ValueHolder in RCP has custom code, which only notifies the listeners
 * specifically registered for the value property. Yet, PropertyChangeSuppport also
 * notifies listeners registered for all properties.
 */
public class ValueHolderFix extends ValueHolder
{
    public ValueHolderFix()
    {
    }

    public ValueHolderFix(Object value)
    {
        super(value);
    }

    protected void fireValueChangeEvent(Object oldValue, Object newValue)
    {
        firePropertyChange(ValueHolder.VALUE_PROPERTY, oldValue, newValue);
    }
}
